# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-frameworks
maintainer="team/kde <bribbers@disroot.org>"
pkgname=solid
pkgver=6.7.0
pkgrel=0
pkgdesc="Hardware integration and detection"
arch="all"
url="https://community.kde.org/Frameworks"
license="LGPL-2.1-only OR LGPL-3.0-only"
depends_dev="qt6-qtdeclarative-dev"
makedepends="$depends_dev
	bison
	doxygen
	eudev-dev
	extra-cmake-modules
	flex-dev
	graphviz
	libimobiledevice-dev
	qt6-qttools-dev
	samurai
	udisks2-dev
	upower-dev
	"
subpackages="$pkgname-dev $pkgname-libs $pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/frameworks/solid.git"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/solid-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	# solidmttest is broken
	ctest --test-dir build --output-on-failure -E "solidmttest"
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
8a5e7670a932d2facccb1a082ff49530d3b16907f90411ba1081c057ce6c5e582aeea63e4e009a9fbf9b50dbe8b21f8af325b3793f8bca99e430cf6b47b32a23  solid-6.7.0.tar.xz
"
